<?php
/**
 * Created by PhpStorm.
 * User: iwm
 * Date: 2017/2/7
 * Time: 16:43
 */

namespace app\home\model\page\shop;

use app\api\model\dao\GoodsBrands;
use app\library\Error;
use app\library\PageBase;

class BrandLists extends PageBase
{
    public function __construct()
    {
        parent::__construct();
    }

    public function excute($param)
    {
        $ret = $this->checkToken($param);
        if (false === $ret) {
            header('Location:/home/loginpage');
            //exit;
            return $this->getRes(Error::ERR_NO_AUTH);
        }

        $obj = new GoodsBrands();
        $data = $obj->getGoodsBrandList();
        $this->data = $data;
        return $this->getRes();
    }
}